﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web.master" AutoEventWireup="true"
    CodeFile="CouponsManage.aspx.cs" Inherits="Platform_CouponsManage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../Scripts/validform.js" type="text/javascript"></script>
    <script src="../Scripts/YJPopup.js" type="text/javascript"></script>
    <script src="../Scripts/GiveTip.js" type="text/javascript"></script>
    <script type="text/javascript">
        var MyPopup;
        $(document).ready(function () {
            MyPopup = new YJPopup({
                contentDivID: "NsContentDiv",
                dragBarDivID: "NsDragBar",
                dragable: true,
                autoCreate: true
            });
            $.checkForm();
        });
        function ShowPopup(SchemeID) {
            MyPopup.Show("90%", "300px", "洗车券修改", "CouponsModify.aspx?SchemeID=" + SchemeID);
        }
        function ClosePopup() {
            MyPopup.Hide();
        } 
    </script>
    <style type="text/css">
        .style1
        {
            width: 156px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table class="tabContent">
        <tr>
            <th lang="th">
                洗车券添加
            </th>
        </tr>
        <tr>
            <td lang='td'>
                <table style="border-collapse: separate" cellpadding="4" cellspacing="4">
                    <tr>
                        <td align="right" style="width: 100px">
                            洗车券名称：
                        </td>
                        <td>
                            <NC:FTextBox ID="txtCouponName" runat="server" Width="150px" CheckGroup="Add" />
                        </td>
                        <td align="right" style="width: 100px">
                            数量：
                        </td>
                        <td>
                            <NC:FTextBox ID="txtQuantity" runat="server" Width="150px" CheckType="Int" CheckGroup="Add">0</NC:FTextBox>
                        </td>
                        <td align="right" style="width: 100px">
                            有效天数：
                        </td>
                        <td class="style1">
                            <NC:FTextBox ID="txtValidDays" runat="server" Width="150px" CheckType="Int" CheckGroup="Add">0</NC:FTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            原价：
                        </td>
                        <td align="left">
                            <NC:FTextBox ID="txtOldPirce" runat="server" Width="150px" CheckType="Decimal" CheckGroup="Add">0.00</NC:FTextBox>
                        </td>
                        <td align="right">
                            优惠价：
                        </td>
                        <td align="left">
                            <NC:FTextBox ID="txtPrePirce" runat="server" Width="150px" CheckType="Decimal" CheckGroup="Add">0.00</NC:FTextBox>
                        </td>
                        <td align="right">
                            使用范围：
                        </td>
                        <td class="style1">
                            <NC:FTextBox ID="txtScope" runat="server" Width="150px" CheckGroup="Add" EnableNull="true" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            说明：
                        </td>
                        <td colspan="3">
                            <NC:FTextBox ID="txtExplain" runat="server" Width="442px" CheckGroup="Add" EnableNull="true" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6" align="center">
                            <asp:Button ID="btnSave" runat="server" class="btn"
                                Text="保 存" CheckGroup="Add" OnClick="btnSave_Click" />
                            <asp:Button ID="btnBindData" runat="server" Text="更新" CssClass="hidden" uncheck="true"
                                OnClick="btnBindData_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <th colspan="4" lang="th">
                洗车券列表
            </th>
        </tr>
        <tr>
            <td lang="td">
                <table style="border-collapse: separate" cellpadding="4" cellspacing="4">
                    <tr>
                        <td>
                            洗车券名称：
                        </td>
                        <td>
                            <NC:FTextBox ID="CouponName" runat="server" Width="100px" EnableCheck="false" />
                        </td>
                        <td>
                            原价：
                        </td>
                        <td>
                            <NC:FTextBox ID="OldPrice" runat="server" Width="70px" EnableCheck="false" />
                        </td>
                        <td>
                            折扣价：
                        </td>
                        <td>
                            <NC:FTextBox ID="PrePrice" runat="server" Width="70px" EnableCheck="false" />
                        </td>
                        <td>
                            <asp:Button ID="btnSearch" runat="server" class="btn btn3" OnClick="btnSearch_Click"
                                Text="查 找" />
                        </td>
                    </tr>
                </table>

                <NC:FGridView ID="FGridView1" runat="server" AutoCreateNumber="true" ShowFooter="true"
                    Width="100%">
                    <Columns>
                        <asp:BoundField DataField="CouponName" HeaderText="洗车券名称">
                            <ItemStyle HorizontalAlign="Left" Width="100px" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Quantity" HeaderText="数量">
                            <ItemStyle HorizontalAlign="Left" Width="100px" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="OldPrice" HeaderText="原价">
                            <ItemStyle HorizontalAlign="Left" Width="100px" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="PrePrice" HeaderText="折扣价">
                            <ItemStyle HorizontalAlign="Left" Width="100px" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ValidDays" HeaderText="有效天数">
                            <ItemStyle HorizontalAlign="Left" Width="100px" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Scope" HeaderText="使用范围">
                            <ItemStyle HorizontalAlign="Left" Width="100px" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Explain" HeaderText="说明">
                            <ItemStyle HorizontalAlign="Left" Width="100px" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="详情">
                            <ItemStyle HorizontalAlign="Center" Width="200px" />
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <input id="btnView" type="button" value="修改" class="Gridbtn" onclick="ShowPopup('<%#Eval("SchemeID") %>')" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="删除">
                            <ItemStyle HorizontalAlign="Center" Width="50px" />
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Button ID="btnDel" runat="server" Text="删除" class="Gridbtn" CommandArgument='<%# Eval("SchemeID") %>'
                                    OnClientClick="return GiveTip(event,'您确定删除吗？')" OnClick="btnDel_Click" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </NC:FGridView>

            </td>
        </tr>
    </table>
</asp:Content>
